package com.itheima.Test5;

public class Thread1 extends Thread {
    @Override
    public void run() {
        int sum=0;
        for (int i = 1; i <= 100; i++) {
            sum +=i;
        }
        System.out.println(getName()+"线程计算1--100的累加和,结果:"+sum);
    }
}
